const SAS1014 = {
  'type': 'object',
  'required': [
    'typeOfAppointment',
    'formNumber',
    'formVersion',
    'entityInformation',
    'principalAuthorizedCompSigner',
    'commissionPayment',
    'backgroundInformation',
    'errorsOmissions',
    'fairCreditReporting'
  ],
  'properties': {
    'typeOfAppointment': {
      'allOf': [
        { '$ref': 'defsSchema.json#/definitions/typeOfAppointment' },
        {
          'properties': {
            'referringAgency': {
              'type': 'string',
              'description': 'Referring Wholesaler/Agency/BGA/IMO'
            },
            'apptType': {
              'type': 'string',
              'enum': [
                'Corporation',
                'Partnership',
                'Association',
                'Limited Liability Corporation',
                'Limited Liability Partnership'
              ]
            }
          },
          'required': ['referringAgency']
        }
      ]
    },
    'entityInformation': {
      '$ref': 'defsSchema.json#/definitions/entityInformation'
    },
    'entityLicensesRegistration': {
      '$ref': 'defsSchema.json#/definitions/entityLicensesRegistration'
    },
    'principalAuthorizedCompSigner': {
      '$ref': 'defsSchema.json#/definitions/principalAuthorizedCompSigner'
    },
    'commissionPayment': {
      '$ref': 'defsSchema.json#/definitions/commissionPayment'
    },
    'backgroundInformation': {
      '$ref': 'defsSchema.json#/definitions/backgroundInformation'
    },
    'errorsOmissions': {
      '$ref': 'defsSchema.json#/definitions/errorsOmissions'
    },
    'fairCreditReporting': {
      '$ref': 'defsSchema.json#/definitions/fairCreditReporting'
    },
    'formNumber': {
      'type': 'string',
      'enum': ['SAS1014']
    },
    'formVersion': {
      'type': 'string'
    }
  }
};

module.exports = { SAS1014 };
